package com.yinp.proapp.web.retrofit;

import com.yinp.proapp.bean.UploadFile;
import com.yinp.proapp.web.erp_retrofit.PictureData;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

public interface ApiRetrofit {
    @FormUrlEncoded
    @POST("user/login")
    Observable<BaseRetrofitData> accountLogin(@Field("username") String username, @Field("password") String password);

    /**
     * 文件批量上传
     * http://erp.shuipingsiwei.cn/api/list
     *
     * @return
     */
    @POST("list")
    @Multipart
    Observable<List<UploadFile>> uploadFileMore(@Part List<MultipartBody.Part> listFile);
}
